﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using scom_a3_web.mutithreadedhttprequets_james;

namespace scom_a3_web.james_svc
{
    public partial class WebForm4 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void b_test_Click(object sender, EventArgs e)
        {
            string[] urls = tb_urls.Text.Split(',');
            for (int i = 0; i < urls.Length; i++)
            {
                urls[i] = urls[i].Trim();
            }
            MultithreadedHttpRequests_JamesClient mhrjc = new MultithreadedHttpRequests_JamesClient();
            string[] results = mhrjc.getHttpResponses(urls, 2);

            for (int i = 0; i < results.Length; i++)
            {
                l_output.Text += results[i];
            }

        }



    }
}